package com.yanqu.road.server.cmd.activity.operamask;

import com.yanqu.road.entity.activity.operamask.OperaMaskConfig;
import com.yanqu.road.entity.activity.operamask.OperaMaskUserData;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.operamask.OperaMaskModule;
import com.yanqu.road.server.manger.activity.ActivityMgr;
import com.yanqu.road.server.manger.activity.operamask.OperaMaskMgr;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_OPERA_MASK_GET_TIPS, desc = "")
public class OperaMaskGetMoveTipsCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        OperaMaskConfig config = OperaMaskMgr.getConfig();
        if (config == null || !ActivityMgr.activityInTime(config.getActivityInfo())) {
            return;
        }
        OperaMaskUserData userData = player.getModule(OperaMaskModule.class).getUserData();
        if (userData == null) {
            return;
        }

        player.getModule(OperaMaskModule.class).eliminateTip();
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
